package com.easy;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Lxk on 2019/7/6.
 */

public class Solution412 {

    public List<String> fizzBuzz(int n) {
        List<String> res = new ArrayList<>();
        if(n<=0){
            return res;
        }
        for(int i = 1;i <= n; i++){
            if(i%15==0){
                res.add("FizzBuzz");
            }else if(i%3==0){
                res.add("Fizz");
            }else if(i%5==0){
                res.add("Buzz");;
            }else{
                res.add(i+"");
            }
        }
        return res;
    }

    public static void main(String[] args) {
        Solution412 solution412 = new Solution412();
        List<String> res = solution412.fizzBuzz(15);
        for(String val : res){
            System.out.println(val);
        }
    }

}
